package vo
{
	[Bindable]
	public class WhoDataPoint {
		public function WhoDataPoint(xml:XML = null) {
			if (xml != null) {
				day = xml.@Day;
				P1 = xml.P1;
				P3 = xml.P3;
				P5 = retrieveData(xml.P5);
				P15 = xml.P15;
				P25 = retrieveData(xml.P25);
				P50 = xml.P50;
				P75 = retrieveData(xml.P75);
				P85 = xml.P85;
				P95 = retrieveData(xml.P95);
				P97 = xml.P97;
				P99 = xml.P99;
			}
		}
		public var day:Number;
		public var P1:Number;
		public var P3:Number;
		public var P5:Number;
		public var P15:Number;
		public var P25:Number;
		public var P50:Number;
		public var P75:Number;
		public var P85:Number;
		public var P95:Number;
		public var P97:Number;
		public var P99:Number;
		
		public function retrieveData(value:String):Number {
			if (value != null && value != "") {
				return Number(value);
			} else {
				return NaN;
			}
		}
		
	}
}